/* 403 NoPermission */
import React, {Component} from 'react';
import {Button} from 'antd';
import PropTypes from 'prop-types';
import Img from '../../../assets/error.gif';
import './index.less'
export default class NoPermission extends Component {
  static propTypes = {
    history: PropTypes.any,
  };

  constructor(props) {
    super(props);
    this.state = {
      show: false
    };
    console.log('-----> 403被加载出来了')
  }

  componentDidMount() {
  }

  handleGoBackHome = () => {
    this.props.history.replace('/index');
  };

  render() {
    return (
        <div className="error-page">
          <div>
            <div className="title">403</div>
            <div className="info">你没有访问该页面的权限</div>
            <div className="info">请联系你的管理员</div>
            <Button className="back-btn" type="primary" ghost onClick={this.handleGoBackHome.bind(this)}>返回首页</Button>
          </div>
          <img src={Img + `?${new Date().getTime()}`}/>
        </div>
    );
  }
}